Faster STR-IC-LCS Computation via RLE

نویسندگان

  • Keita Kuboi
  • Yuta Fujishige
  • Shunsuke Inenaga
  • Hideo Bannai
  • Masayuki Takeda
چکیده

The constrained LCS problem asks one to find a longest common subsequence of two input strings A and B with some constraints. The STR-IC-LCS problem is a variant of the constrained LCS problem, where the solution must include a given constraint string C as a substring. Given two strings A and B of respective lengths M and N , and a constraint string C of length at most min{M,N}, the best known algorithm for the STR-IC-LCS problem, proposed by Deorowicz (Inf. Process. Lett., 11:423–426, 2012), runs in O(MN) time. In this work, we present an O(mN+nM)time solution to the STR-IC-LCS problem, where m and n denote the sizes of the run-length encodings of A and B, respectively. Since m ≤ M and n ≤ N always hold, our algorithm is always as fast as Deorowicz’s algorithm, and is faster when input strings are compressible via RLE. 1998 ACM Subject Classification F.2.2 Nonnumerical Algorithms and Problems

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Quadratic-time Algorithm for the String Constrained LCS Problem

The problem of finding a longest common subsequence of two main sequences with some constraint that must be a substring of the result (STR-IC-LCS) was formulated recently. It is a variant of the constrained longest common subsequence problem. As the known algorithms for the STR-IC-LCS problem are cubic-time, the presented quadratic-time algorithm is significantly faster.

متن کامل

Longest common subsequence between run-length-encoded strings: a new algorithm with improved parallelism

Data compression can be used to simultaneously reduce memory, communication and computation requirements of string comparison. In this paper we address the problem of computing the length of the longest common subsequence (LCS) between run-length-encoded (RLE) strings. We exploit RLE both to reduce the complexity of LCS computation from O(M × N) to O(mN + Mn − mn), where M and N are the lengths...

متن کامل

An Efficient Dynamic Programming Algorithm for STR-IC-STR-IC-LCS Problem

In this paper, we consider a generalized longest common subsequence problem, in which a constraining sequence of length s must be included as a substring and the other constraining sequence of length t must be excluded as a subsequence of two main sequences and the length of the result must be maximal. For the two input sequences X and Y of lengths n and m, and the given two constraining sequen...

متن کامل

Efficient polynomial-time algorithms for the constrained LCS problem with strings exclusion

In this paper,we revisit a recent variant of the longest common subsequence (LCS) problem, the string-excluding constrainedLCS (STR-EC-LCS) problem,which was first addressed by Chen and Chao (J Comb Optim 21(3):383–392, 2011). Given two sequences X and Y of lengths m and n, respectively, and a constraint string P of length r, we are to find a common subsequence Z of X and Y which excludes P as ...

متن کامل

A Simple Algorithm for Solving for the Generalized Longest Common Subsequence (LCS) Problem with a Substring Exclusion Constraint

This paper studies the string-excluding (STR-EC)-constrained longest common subsequence (LCS) problem, a generalized LCS problem. For the two input sequences, X and Y , of lengths n andm and a constraint string, P , of length r, the goal is to find the longest common subsequence, Z, of X and Y that excludes P as a substring. The problem and its solution were first proposed by Chen and Chao, but...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2017